/*
 * @Descripttion: 专题管理
 * @Author: Panll
 * @Date: 2021-05-01 10:29:19
 */
import request from '@/utils/request';
import qs from 'qs';

/**
 * @description: 保存专题-保存与更新调用此接口都可
 * @param {*} data
 * @return {*}
 */
export function subject(data) {
  return request({
    url: '/v1/subject',
    method: 'post',
    data
  });
}

/**
 * @description: 删除专题
 * @param {*} id
 */
export function subjectDelete(id) {
  return request({
    url: `/v1/subject/delete/${id}`,
    method: 'delete'
  });
}

/**
 * @description: 根据ID获取专题信息
 * @param {*} id
 * @return {*}
 */
export function findSubjectById(id) {
  return request({
    url: `/v1/subject/findSubjectById`,
    method: 'post',
    data: qs.stringify({ subjectId: id })
  });
}
